package com.doyens.controller;

import com.doyens.common.R;
import com.doyens.entity.Post;
import com.doyens.service.PostService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "查询员工职位接口")
@RestController
@RequestMapping("/post")
@Slf4j
public class PostController {

    @Autowired
    private PostService postService;

    @GetMapping(value = "list")
    @ApiOperation(value = "下拉框展示职位名称方法")
    public R<List<Post>> list(){
        return R.success(postService.list());
    }
}
